package cli

import (
	"blockchaingo/block"
	"fmt"
)

func (cli *CLI) redindexUTXO() {
	bc := block.NewBlockChain("test")
	utxSet := block.UTXOSet{bc}

	utxSet.Reindex()

	count := utxSet.CountTransactions()
	fmt.Printf("Done! There are %d transactions in the UTXO set.\n", count)
}
